from AHP import AHP
import numpy as np

# 准则重要性矩阵
criteria = np.array([[1, 2, 7, 5, 5],
                     [1 / 2, 1, 4, 3, 3],
                     [1 / 7, 1 / 4, 1, 1 / 2, 1 / 3],
                     [1 / 5, 1 / 3, 2, 1, 1],
                     [1 / 5, 1 / 3, 3, 1, 1]])

# 对每个准则，方案优劣排序
b1 = np.array([[1, 1 / 3, 1 / 8], [3, 1, 1 / 3], [8, 3, 1]])
b2 = np.array([[1, 2, 5], [1 / 2, 1, 2], [1 / 5, 1 / 2, 1]])
b3 = np.array([[1, 1, 3], [1, 1, 3], [1 / 3, 1 / 3, 1]])
b4 = np.array([[1, 3, 4], [1 / 3, 1, 1], [1 / 4, 1, 1]])
b5 = np.array([[1, 4, 1 / 2], [1 / 4, 1, 1 / 4], [2, 4, 1]])

b = [b1, b2, b3, b4, b5]
a = AHP(criteria, b).run()
